package service

import (
	"github.com/starmotioncf/common/event"
	"github.com/starmotioncf/soutchatinternal/repository"
	"github.com/starmotioncf/soutchatpkg/notify"

	"github.com/redis/go-redis/v9"
)

type Service struct {
	repository.Transaction
	event.EventBus
	*notify.Notify
	rdb *redis.Client
}

func NewService(tm repository.Transaction, eventBus event.EventBus, rdb *redis.Client, notify *notify.Notify) *Service {
	return &Service{
		Transaction: tm,
		EventBus:    eventBus,
		Notify:      notify,
		rdb:         rdb,
	}
}

func (s *Service) RDB() *redis.Client {
	return s.rdb
}
